
from tkinter import *
print("Введите начальную координату X:")
x = int(input())
print("Введите начальную координату Y:")
y = int(input())
print("Введите начальную координату N:")
n = int(input())
cord = [0, 0, 10, 0, 10, 10, 20, 10, 20, 20, 10, 20, 10, 30, 0, 30]
if n == 0 and x >= 0 and x <= 500 and y >= 0 and y <= 500:
    pass
else:
    if n > 0 and 0*n+x >= 0 and 0*n+y >= 0 and 20*n+x <= 500and 20*n+x and 30*n+y:
        pass
    else:
        if n < 0 and 20*n+x >= 0 and 30*n+y >= 0 and 0*n+x <= 500and 0*n+y <= 500:
            pass
        else:
            print("Размер фигуры превышает максимальный размер поля")

root = Tk()
root.title("ИТ-МАРАФОН")
root.geometry("500x500")
canvas = Canvas(bg="white", width=500, height=500)
canvas.pack(anchor=CENTER, expand=1)
canvas.create_polygon(cord[0]*n+x, cord[1]*n+y,
                      cord[2]*n+x, cord[3]*n+y,
                      cord[4]*n+x, cord[5]*n+x,
                      cord[6]*n+x, cord[7]*n+x,
                      cord[8]*n+x, cord[9]*n+x,
                      cord[10]*n+x, cord[11]*n+x,
                      cord[12]*n+x, cord[13]*n+x,
                      cord[14]*n+x, cord[15]*n+x)
root.mainloop()
